﻿using DimensionsHelper.Common.Contracts.Excel;

namespace DimensionsHelper.Common.Contracts.DataCollector;

/// <summary>
///     数据收集器读取的文件配置信息
/// </summary>
public class CollectorInputFile
{
    /// <summary>
    /// 创建数据收集器读取的文件配置信息
    /// </summary>
    /// <param name="index">文件数据索引</param>
    /// <param name="fileName">文件名</param>
    /// <param name="expression">文件级别的筛选表达式。</param>
    /// <param name="operator">此文件使用的操作器实例，不需要打开。</param>
    public CollectorInputFile(int index, string fileName, string? expression, IExcelWorkbookOperator @operator)
    {
        Index = index;
        FileName = fileName;
        Expression = expression;
        Operator = @operator;
    }

    public int Index { get; }

    public string FileName { get; }

    public string? Expression { get; }

    public IExcelWorkbookOperator Operator { get; }
}